// pages/goods_detail/index.js
import { request } from "../../request/index.js";
Page({
  data: {
    //轮播图数组
  swiperList:[], 
    //导航数组
  catesList:[]
  },
  //页面开始加载的时候就会触发
  onLoad: function (options) {
  this.getSwiperList();
  this.getCateList();
  this.getFloorList();
},
//获取轮播图数据
getSwiperList(){
  request({url:"/swiperlists"})
  .then(result=> {
    this.setData({
         swiperList:result
     })  
  })
},
//获取导航栏数据
getCateList(){
  request({url:"/cateslists"})
  .then(result=> {
    this.setData({
         catesList:result
     })  
  })
},
//获取楼层数据
getFloorList(){
    request({url:"/floorlists"})
      .then(result => {
        this.setData({
          floorList: result
        })
      })
  }
})